Contact balance GET
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/accounting-service/contact/{customerId}/currency/{isoCurrencyCode}/balance[?dateFrom={dateFrom}&dateTo={dateTo}]
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
Retrieves the balance for a contact (customer or supplier) for a given currency from and up to (including) the specified dates.
If supplied, the dates at which to get the balance must be in the ISO format yyyy-mm-dd.
If there are no transactions for the specified customer and currency code, a null balance will be returned to distinguish from a balance of zero where transactions are present. The existence of the customer and currency code are not explicitly validated so will return HTTP 200 with a null balance.
Example 1
Request URI
/contact/207/currency/GBP/balance
Response
{
"response": "50.00"
}
Example 2
Request URI
/contact/299/currency/USD/balance?dateTo=2017-01-01
Response
{
"response": "42.00"
}
Example 3
Request URI
/contact/200/currency/USD/balance
Response
{
"response": null
}
Example 4
Request URI
/contact/200/currency/XYZ/balance
Response
{
"response": null
}